package org.dromara.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 交易记录对象 trading_records
 *
 * @author Lion Li
 * @date 2025-07-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("trading_records")
public class TradingRecords extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;


    @TableId(value = "id")
    private Long id;

    private Long userId;

    private Long bindUserId;

    private Long machineId;

    private String sn;


    private String orderNo;

    /**
     * 交易额
     */
    private BigDecimal amount;

    /*
     * 服务费
     * */
    private BigDecimal serviceMoney;

    /*
     * 结算金额
     * */
    private BigDecimal settlesAmountMoney;


    private String dealRate;


    private String merchantCode;

    private String merchantName;

    /**
     * 交易时间
     */
    private Date tradingTime;


    private BigDecimal points;

    /**
     * 备注
     */
    private String remark;


    @TableField(exist = false)
    private Boolean isDebitCard;


    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    private String delFlag;


}
